package cn.imokay.oom;

import java.util.ArrayList;

/**
 * -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 */
public class HeapOOM {
    static class OOMObj{}

    public static void main(String[] args) {
        ArrayList<OOMObj> oomObjs = new ArrayList<>();
        while(true){
            oomObjs.add(new OOMObj());
        }
    }
}
